package self.hoy.demo.grainmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import self.hoy.demo.common.utils.PageUtils;
import self.hoy.demo.grainmall.product.entity.Attr;
import self.hoy.demo.grainmall.product.vo.AttrRelationVo;
import self.hoy.demo.grainmall.product.vo.AttrRespVo;
import self.hoy.demo.grainmall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author Hoy
 * @email xxx@gmail.com
 * @date 2020-07-04 19:01:00
 */
public interface AttrService extends IService<Attr> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttr(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    List<Attr> getRelationAttr(Long attrgroupId);

    void deleteRelation(AttrRelationVo[] vos);

    /**
     * 获取当前分组没有关联的所有属性
     * @param params
     * @param attrgroupId
     * @return
     */
    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    List<Long> selectSearchAttrIds(List<Long> attrIds);
}

